package com.hupu.jrs.util

import android.content.Context
import android.widget.Toast

/**
 * Created by sll on 2016/1/11.
 */
object ToastUtil {

    lateinit var mContext: Context

    fun register(context: Context) {
        mContext = context.applicationContext
    }

    fun showToast(resId: Int) {
        Toast.makeText(mContext, mContext.getString(resId), Toast.LENGTH_SHORT).show()
    }

    fun showToast(msg: String) {
        Toast.makeText(mContext, msg, Toast.LENGTH_SHORT).show()
    }
}
